public abstract class Decorator extends Component {
    protected Component component;

    public Decorator(Component component) {
        this.component = component;
    }
    @Override
    public double cost() {
        return component.cost();
    }
}